
#*--encoding:UTF-8--*

'''
整理数据
'''
from common.config import *
from db.mysql import MysqlClient
from common.helper import Helper

class Arrangement( object ):

    def __init__(self):
        self.name = "嘟佩奇保险产品计划"
        self.mysql = MysqlClient()

    def pullData(self, data={}):
        for item in Helper.selectData(self.name, self.mysql):

            data["name"] = self.name
            data["company"] = "华夏保险"
            data["year"] = item["year"]
            data["gender"] = "1" if item["gender"]=="0" else "0"
            data["expire"] = "17岁以下"
            data["payType"] = "一次交清"
            data["socialSec"] = item["socialSec"]
            data["price"] = item["price"]
            data["majorDisease"] = "20w"
            data["midDisease"] = "10w"
            data["slightDisease"] = "7w"
            data["accidentalDie"] = "20w"
            data["accidentMedic"] = "1w"
            Helper.mergeTable( self.name,self.mysql,data )



